import EditorJS from "@editorjs/editorjs";
import "./index.less"
import {message} from "antd";
import {useEffect} from "react";

const BlockEdit = () => {
    const editor = new EditorJS({
        /**
         * Id of Element that should contain Editor instance
         */
        holder: 'blockEditor',
        placeholder:"在这里输入内容"
    });
    useEffect(() => {
        editor.isReady.then(() => {
            message.success("块编辑器加载完成")
            editor.focus()
        })
    },[])
    return (
        <div className={"h-full"}>
            <div id={"blockEditor"} ></div>
        </div>
    );
};

export default BlockEdit;
